﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 责任链模式
{
    class Program
    {
        static void Main(string[] args)
        {
            ApplyContext context = new ApplyContext()
            {
                Id = 8888,
                Name = "大黄瓜",
                Hour = 40,
                Description = "我想参加波多野结衣的线下活动",
                AuditResult = false,
                AuditRemark = ""
            };

            BaseAuditor auditor = AuditorManager.GetAuditor();
            auditor.Audit(context);
            //PM pm = new PM()
            //{
            //    Name = "大黄瓜PM"
            //};

            //Charge charge = new Charge()
            //{
            //    Name = "大黄瓜Charge"
            //};

            //Manager manager = new Manager()
            //{
            //    Name = "大黄瓜Manager"
            //};

            //pm.SetNext(charge);
            //charge.SetNext(manager);


            //pm.Audit(context);

            if (context.AuditResult)
            {
                Console.WriteLine("审批通过");
            }
            else
            {
                Console.WriteLine("审批不通过");
            }
            Console.Read();
        }
    }
}
